//package com.starblink.android.basic.urllink
//
//
//object UrlLinkUtilsCopy {
//
//
//    //原scheme协议业务 下边废弃 白写了
////        if (url.startsWith(BaseApiClient.getCurrSvrCfgEnvH5Host()) ||
////            url.startsWith(ANDROID_SCHEME)
////        ) {
////            var endUrl = ""
////
////            //去除深链接的scheme头
////            if (url.startsWith(BaseApiClient.getCurrSvrCfgEnvH5Host())) {
////                var trackerStr = Uri.parse(url)
////                if (trackerStr.toString().isEmpty()) return
////                val params = hashMapOf<String, String>()
////                var key: String
////                var value: String
////                val keyNamesList = trackerStr.queryParameterNames
////                val iterator = keyNamesList.iterator()
////                while (iterator.hasNext()) {
////                    key = iterator.next() as String
////                    value = trackerStr.getQueryParameter(key) as String
////                    params[key] = value
////                }
////                //获取邀请码
////                if (params["inviteCode"] != null) {
////                    val code = params["inviteCode"] ?: ""
////                    UserDataCenter.inviteCode = code
////                }
////                endUrl = url.substring("${BaseApiClient.getCurrSvrCfgEnvH5Host()}".length)
////            } else {
////                endUrl = url.substring(ANDROID_SCHEME.length)
////            }
////
////            if (endUrl.contains(turnappPath)) {
////                endUrl = endUrl.replace(turnappPath, "")
////            }
////            if (endUrl.contains("creators/register")) {
////                //TODO
////                //达人注册 原生删除此代码 后续有需要 请前往UriLinkUtils.dart
////            } else if (endUrl.contains("creators/new-user-register")) {
////                //TODO
////            } else if (endUrl.startsWith(wishlistPath)) {
////                //TODO
////                toast("跳转到心愿单")
////            } else {
////                if (endUrl.contains("?")) {
////                    var postId = ""
////                    if (endUrl.startsWith(picPath)) {
////                        //内容详情//图文详情
////                        //@张启明
////                        postId = endUrl.substring(picPath.length)
//////                        context.navigationTo(RoutePage.Product.PAGE_DETAIL) {
//////                            extraOf(
//////                                RoutePage.Product.POST_ID to postId,
//////                            )
//////                        }
//////                        SkGetXRouteAgent.toNamed(
//////                            SkAppRoutes.getPostPicDetailsPage,
//////                            arguments: {
//////                            "postId": postId,
//////                            "eventSite": "message_turn"
//////                        });
////                    } else if (endUrl.startsWith(videoPath)) {
////                        //视频内容详情
////                        //@张启明
////                        postId = endUrl.substring(videoPath.length)
//////                        context.navigationTo(RoutePage.Product.PAGE_DETAIL) {
//////                            extraOf(
//////                                RoutePage.Product.POST_ID to postId,
//////                            )
//////                        }
//////                        SkGetXRouteAgent.toNamed(
//////                            SkAppRoutes.getSingleVideoDetails,
//////                            arguments: {
//////                            "postId": postId,
//////                            "eventSite": EventScene.message_turn
//////                        });
////                    } else if (endUrl.startsWith(tagPath)) {
////                        //话题内容详情
////                        //@张启明
////                        postId = endUrl.substring(tagPath.length)
//////                        context.navigationTo(RoutePage.Product.PAGE_DETAIL) {
//////                            extraOf(
//////                                RoutePage.Product.POST_ID to postId,
//////                            )
//////                        }
//////                        SkGetXRouteAgent.toNamed(
//////                            SkAppRoutes.getTopicDetailsPage,
//////                            arguments: {
//////                            "topicId": postId,
//////                            "eventSite": EventScene.message_turn,
//////                        });
////                    } else if (endUrl.startsWith(blogPath)) {
////                        //测评内容详情
////                        //@张启明
////                        postId = endUrl.substring(blogPath.length)
//////                        SkGetXRouteAgent.toNamed(
//////                            SkAppRoutes.getAccountAppraisalDetailPage,
//////                            arguments: {
//////                            "aid": postId,
//////                            "eventSite": EventScene.message_turn
//////                        });
////                    } else if (endUrl.startsWith(productPath)) {
////                        //商品内容详情
////                        //  //@张启明
////                        var paramsStr =
////                            endUrl.substring(productPath.length)
////                        var item = parseParams(paramsStr)
//////                        SkNavCenter()
//////                            .getToName(SkAppRoutes.getProductDetailPage, arguments: {
//////                                'id': item['id'] ?? "",
//////                                'standardSpuIds': item['standardSpuIds'] ?? "",
//////                                "label": item['label'] ?? "",
//////                                "saleableCountryFlag": item['saleableCountryFlag'] ?? true,
//////                                "lowestPrice": item['lowestPrice'] ??-1,
//////                                "highestPrice": item['highestPrice'] ??-1,
//////                                "position": EventScene.message_turn,
//////                            });
////                    }
////                }
////            }
////
////            /// h5 链接无需走以下判断
////            return
////        }
////
////        if (!url.contains(getShareBaseUrl()) &&
////            !url.startsWith(STAR_BLINK_STR)
////        ) {
////            return
////        }
////
////        val baseUrl =
////            if (url.startsWith(STAR_BLINK_STR)) "starblink://detail?url=${getShareBaseUrl()}" else getShareBaseUrl()
////
////        var routeName = url.substring(baseUrl.length, url.length)
////
////
////        //这里的写法没看懂 是否真的要切环境 如果是 那我觉得是配的人有问题
////        //这里的写法没看懂 是否真的要切环境 如果是 那我觉得是配的人有问题
////        //   var list = ApiClient.getSvrCfgEnvNameList();
////        //    for (var i = 0; i < list.length; i++) {
////        //      var prefix = "${list[i]}.";
////        //      if (routeName.startsWith(prefix) == true) {
////        //        await ApiClient.switchSvrCfgEnv(env: i);
////        //        routeName = routeName.substring(prefix.length);
////        //        break;
////        //      }
////        //    }
////        var prefix = "${BaseApiClient.getCurrSvrCfgEnvName()}."
////        if (routeName.startsWith(prefix) ) {
////            routeName = routeName.substring(prefix.length)
////        }
////
////        if (routeName.startsWith("user.wish_list&")  ) {
////            //跳转wisilist 主客态
////            //TODO
////        } else if (routeName.startsWith("appraisal.detail&")  ) {
////            var params =
////                routeName.substring("appraisal.detail&".length)
////            //TODO
//////            Map paramsMap = ShareUtils . parseParams (params);
//////            var id = paramsMap["id"];
//////            SkGetXRouteAgent.toNamed(
//////                SkAppRoutes.getAccountAppraisalDetailPage,
//////                arguments: { "aid": id });
////        }
//
//
//}